{% extends "business/customer.html" %}
{% block content %}
<form id="input_form" class="form-inline" action="" method="post">
    {% csrf_token %}
    <div class="row">
          <div class="col-md-4 form-group">
              <label for="name"><span style="color: red;font-weight:bold">*</span>客户名称: </label>
              <input id="name" class="form-control" type="text" name="name" placeholder="客户名称 (必填)">
          </div>
          <div class="col-md-4 form-group">
              <label for="address"><span style="color: red;font-weight:bold">*</span>客户地址：</label>
              <input id="address" class="form-control" type="text" name="address" placeholder="客户地址 (必填)">
          </div>
          <div class="col-md-4 form-group">
              <label for="trade">客户行业：</label>
              <select name="trade" id="trade" class="form-control">
                  <option>互联网行业</option>
                  <option>软件开发</option>
                  <option>网络运营商ISP</option>
                  <option>金融</option>
                  <option>教育</option>
                  <option>媒体</option>
                  <option>租赁商务</option>
                  <option>批发和零售</option>
                  <option>制造业</option>
                  <option>房地产业</option>
                  <option>建筑业</option>
                  <option>服务业</option>
                  <option>政府机构</option>
                  <option>其他</option>
              </select>
          </div>
    </div>
    <br>

    <div class="row">
          <div class="col-md-4 form-group">
              <label for="contact"><span style="color: red;font-weight:bold">*</span>联系人：</label>
              <input id="contact" class="form-control" type="text" name="contact" placeholder="客户联系人 (必填)">
          </div>
          <div class="col-md-4 form-group">
              <label for="telenumber"><span style="color: red;font-weight:bold">*</span>联系电话：</label>
              <input id="telenumber" class="form-control" type="text" name="telenumber" placeholder="联系电话（必填）">
          </div>
          <div class="col-md-4 form-group">
              <label for="email">联系邮箱：</label>
              <input id="email" class="form-control" type="text" name="email" placeholder="联系邮箱">
          </div>
    </div>
    <br>

    <div class="row">
        <div class="col-md-4 form-group">
            <label for="saler">销售：</label>
            <select name="saler" id="saler" class="form-control">
                <option>none</option>
                <option>tyler</option>
                <option>ian</option>
                <option>mark</option>
                <option>david</option>
                <option>lijian</option>
                <option>richerd</option>
                <option>joyce</option>
                <option>other</option>
            </select>
        </div>
        <div class="col-md-4 form-group">
            <label for="level">客户级别：</label>
            <select name="level" id="level" class="form-control">
                  <option>普通客户</option>
                  <option>白银客户</option>
                  <option>黄金客户</option>
                  <option>白金客户</option>
                  <option>铂金客户</option>
                  <option>钻石客户</option>
            </select>
        </div>
        <div class="col-md-4 form-group">
            <label for="remark">备注信息(限1200字)：</label>
            <textarea id="remark" class="form-control" name="remark" rows="5" cols="40" placeholder="备注信息"></textarea>
        </div>
    </div>
    <br>

    <button id="submit_button" type="submit" class="btn btn-primary">添加</button>
    <button type="reset" class="btn btn-primary">清空内容</button>
    <a class="btn btn-primary" href="/business" role="button">取消</a>
</form>
<script>
$(document).ready($("#submit_button").click(function () {

    $('#input_form input,textarea').each(function () {
        $(this).val($.trim($(this).val()));
    });

}));
</script>
{% endblock %}